Skip to content

[Documentation] Add virtual-hosted-style addressing to presigned URL documentation examples#4768

Merged
SamRemis merged 1 commit intoboto:developfrom
adev-code:doc_presignexample
Apr 20, 2026
Merged

[Documentation] Add virtual-hosted-style addressing to presigned URL documentation examples#4768
SamRemis merged 1 commit intoboto:developfrom
adev-code:doc_presignexample

Conversation

@adev-code
Copy link
Copy Markdown
Contributor

Description

Presigned URLs generated without addressing_style='virtual' use the legacy
global endpoint (bucket.s3.amazonaws.com), which returns
SignatureDoesNotMatch or IllegalLocationConstraintException errors for S3
buckets in newer Regions (e.g., eu-north-1, il-central-1).

Changes

  • Updated the recommendation text to include virtual-hosted-style addressing
  • Added s3={'addressing_style': 'virtual'} to the Config in all three
    code examples: create_presigned_url, create_presigned_url_expanded,
    and create_presigned_post

Testing

Screenshot 2026-04-15 at 2 08 51 PM Screenshot 2026-04-15 at 2 09 07 PM Screenshot 2026-04-15 at 2 09 18 PM

legacy global endpoint (bucket.s3.amazonaws.com), which returns errors
for S3 buckets in Regions launched after March 20, 2019.

Updated all three code examples (create_presigned_url,
create_presigned_url_expanded, create_presigned_post) to include
s3={'addressing_style': 'virtual'} in the Config, and updated the
recommendation text to mention virtual-hosted-style addressing.
@SamRemis SamRemis merged commit 7eff2b3 into boto:develop Apr 20, 2026
48 checks passed
aws-sdk-python-automation added a commit that referenced this pull request Apr 20, 2026
* release-1.42.92:
  Bumping version to 1.42.92
  Add changelog entries from botocore
  Update presigned URL docs to include addressing style config (#4768)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants